<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
    'as'         => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->get('/forms/config', 'SystemSetController@settings');

    $router->resource('users', UserController::class);

    $router->resource('course', CourseController::class);
    $router->get('/course-edit', 'CourseController@courseEdit');
    $router->post('/editor_upload_img_wang2', 'EditorUploadController@uploadImgWangEditor2');
    $router->resource('course-section', CourseSectionController::class);
    $router->post('course-section/update','CourseSectionController@update');
    $router->post('course-section/save','CourseSectionController@store');

    $router->resource('recommend', RecommendController::class);
    $router->get('/recommend-edit', 'RecommendController@recommendEdit');

    $router->resource('mutual', MutualController::class);
    $router->post('mutual/update','MutualController@update');
    $router->post('mutual/save','MutualController@store');

    $router->resource('teacher', TeacherController::class);

//    $router->resource('category', CategoryController::class);

    $router->resource('order', OrderController::class);

    $router->resource('campus', CampusController::class);

    $router->resource('course-order', CourseOrderController::class);

    $router->resource('benefit', BenefitController::class);

    $router->resource('shop', ShopController::class);

    $router->resource('goods', GoodsController::class);

    $router->resource('video', VideoController::class);
    $router->resource('banner', BannerController::class);
    $router->resource('user-statics', UserStaticsController::class);
    $router->resource('course-statics', CourseStaticsController::class);
    $router->resource('teacher-statics', TeacherStaticsController::class);
    $router->resource('user-benefit', UserBenefitController::class);
});
